package com.allwees.bs.module.ops.service.impl;


import com.allwees.bs.module.base.service.impl.BoServiceImpl;
import com.allwees.bs.module.ops.dao.CouponDefDao;
import com.allwees.bs.module.ops.entity.CouponDef;
import com.allwees.bs.module.ops.req.CouponDefCrudReq;
import com.allwees.bs.module.ops.service.CouponDefService;
import org.springframework.stereotype.Service;
import org.springframework.util.Assert;

@Service
public class CouponDefServiceImpl extends BoServiceImpl<CouponDefDao, CouponDef> implements CouponDefService {

    @Override
    public void save(CouponDefCrudReq req) {
        CouponDef coupondef = req.getBo();
        baseMapper.insert(coupondef);
    }

    @Override
    public void update(CouponDefCrudReq req) {
        Assert.hasLength(req.getBo().getUuid(),"uuid 不能为空");
        updateByUuid(req.getBo());
    }
}
